<!DOCTYPE html><html><head><title>20200101第一天作业和预习</title><meta charset='utf-8'><link href='https://cdn.maxiang.io/res-min/themes/marxico.css' rel='stylesheet'><style>
.note-content  {font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif;}

</style></head><body><div id='preview-contents' class='note-content'>
                        
                    



<h2 id="20200101第一天作业和预习">20200101第一天作业和预习</h2>

<h3 id="作业1">作业1</h3>

<p>回去整理对象和数组中长用的方法</p>



<pre class="prettyprint hljs-dark"><code class="hljs javascript"><div class="hljs-line"><span class="hljs-built_in">console</span>.dir(<span class="hljs-built_in">Array</span>.prototype);
</div><div class="hljs-line"><span class="hljs-built_in">console</span>.dir(<span class="hljs-built_in">Array</span>);
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line"><span class="hljs-built_in">console</span>.dir(<span class="hljs-built_in">Object</span>.prototype);
</div><div class="hljs-line"><span class="hljs-built_in">console</span>.dir(<span class="hljs-built_in">Object</span>);
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">https:<span class="hljs-comment">//developer.mozilla.org/zh-CN/</span>
</div></code></pre>



<h3 id="作业2">作业2</h3>

<p>完成以下几道练习题</p>



<pre class="prettyprint hljs-dark"><code class="hljs mipsasm"><div class="hljs-line"><span class="hljs-comment">/*阿里面试题*/</span>
</div><div class="hljs-line">let a = {
</div><div class="hljs-line">    n: <span class="hljs-number">10</span>
</div><div class="hljs-line">}<span class="hljs-comment">;</span>
</div><div class="hljs-line">let <span class="hljs-keyword">b </span>= a<span class="hljs-comment">;</span>
</div><div class="hljs-line"><span class="hljs-keyword">b.m </span>= <span class="hljs-keyword">b </span>= {
</div><div class="hljs-line">    n: <span class="hljs-number">20</span>
</div><div class="hljs-line">}<span class="hljs-comment">;</span>
</div><div class="hljs-line">console.log(a)<span class="hljs-comment">;</span>
</div><div class="hljs-line">console.log(<span class="hljs-keyword">b);</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs gauss"><div class="hljs-line"><span class="hljs-comment">/*360面试题*/</span>
</div><div class="hljs-line"><span class="hljs-keyword">let</span> x = [<span class="hljs-number">12</span>, <span class="hljs-number">23</span>];
</div><div class="hljs-line">function <span class="hljs-function"><span class="hljs-keyword">fn</span><span class="hljs-params">(y)</span> {</span>
</div><div class="hljs-line"><span class="hljs-function">    y[<span class="hljs-number">0</span>] = <span class="hljs-number">100</span></span>;
</div><div class="hljs-line">    y = [<span class="hljs-number">100</span>];
</div><div class="hljs-line">    y[<span class="hljs-number">1</span>] = <span class="hljs-number">200</span>;
</div><div class="hljs-line">    console.<span class="hljs-built_in">log</span>(y);
</div><div class="hljs-line">}
</div><div class="hljs-line"><span class="hljs-function"><span class="hljs-keyword">fn</span><span class="hljs-params">(x)</span></span>;
</div><div class="hljs-line">console.<span class="hljs-built_in">log</span>(x);
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs javascript"><div class="hljs-line"><span class="hljs-keyword">var</span> x = <span class="hljs-number">10</span>;
</div><div class="hljs-line">~ <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">x</span>) </span>{
</div><div class="hljs-line">    <span class="hljs-built_in">console</span>.log(x);
</div><div class="hljs-line">    x = x || <span class="hljs-number">20</span> &amp;&amp; <span class="hljs-number">30</span> || <span class="hljs-number">40</span>;
</div><div class="hljs-line">    <span class="hljs-built_in">console</span>.log(x);
</div><div class="hljs-line">}();
</div><div class="hljs-line"><span class="hljs-built_in">console</span>.log(x);
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs llvm"><div class="hljs-line">let <span class="hljs-keyword">x</span> = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>],
</div><div class="hljs-line">    y = [<span class="hljs-number">3</span>, <span class="hljs-number">4</span>]<span class="hljs-comment">;</span>
</div><div class="hljs-line"><span class="hljs-comment"></span>~ function (<span class="hljs-keyword">x</span>) {
</div><div class="hljs-line">    <span class="hljs-keyword">x</span>.push('A')<span class="hljs-comment">;</span>
</div><div class="hljs-line"><span class="hljs-comment"></span>    <span class="hljs-keyword">x</span> = <span class="hljs-keyword">x</span>.slice(<span class="hljs-number">0</span>)<span class="hljs-comment">;</span>
</div><div class="hljs-line"><span class="hljs-comment"></span>    <span class="hljs-keyword">x</span>.push('B')<span class="hljs-comment">;</span>
</div><div class="hljs-line"><span class="hljs-comment"></span>    <span class="hljs-keyword">x</span> = y<span class="hljs-comment">;</span>
</div><div class="hljs-line"><span class="hljs-comment"></span>    <span class="hljs-keyword">x</span>.push('C')<span class="hljs-comment">;</span>
</div><div class="hljs-line"><span class="hljs-comment"></span>    console.log(<span class="hljs-keyword">x</span>, y)<span class="hljs-comment">;</span>
</div><div class="hljs-line"><span class="hljs-comment"></span>}(<span class="hljs-keyword">x</span>)<span class="hljs-comment">;</span>
</div><div class="hljs-line"><span class="hljs-comment"></span>console.log(<span class="hljs-keyword">x</span>, y)<span class="hljs-comment">;</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs javascript"><div class="hljs-line"><span class="hljs-keyword">let</span> res = <span class="hljs-built_in">parseFloat</span>(<span class="hljs-string">'left:200px'</span>);
</div><div class="hljs-line"><span class="hljs-keyword">if</span>(res===<span class="hljs-number">200</span>){
</div><div class="hljs-line">   alert(<span class="hljs-number">200</span>);
</div><div class="hljs-line">}<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(res===<span class="hljs-literal">NaN</span>){
</div><div class="hljs-line">   alert(<span class="hljs-literal">NaN</span>);
</div><div class="hljs-line">}<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(<span class="hljs-keyword">typeof</span> res===<span class="hljs-string">'number'</span>){
</div><div class="hljs-line">   alert(<span class="hljs-string">'number'</span>);
</div><div class="hljs-line">}<span class="hljs-keyword">else</span>{
</div><div class="hljs-line">   alert(<span class="hljs-string">'Invalid Number'</span>);
</div><div class="hljs-line">}
</div></code></pre>



<h3 id="预习或者复习">预习或者复习</h3>

<blockquote>
  <p>感觉基础不好的可以看看这个视频（超基础，小白的入门视频） <br>
  <a href="https://pan.baidu.com/s/1905T1c_WY7onxHYZl8c2Zg" target="_blank">https://pan.baidu.com/s/1905T1c_WY7onxHYZl8c2Zg</a></p>
</blockquote>



<p><img longdesc="./1577891638546.png" alt="Alt text" title="" type="image/png" src="" class=""></p>

<blockquote>
  <p><a href="http://www.javascriptpeixun.cn/my/course/1217" target="_blank">http://www.javascriptpeixun.cn/my/course/1217</a> <br>
  这个开通的视频中，06~12课时是关于咱们下一节课要讲的基础详细版，感觉上课听课吃力的同学，可以提前看看</p>
</blockquote>

<p><img longdesc="./1577891581883.png" alt="Alt text" title="" type="image/png" src="" class=""></p>

<blockquote>
  <p><a href="http://www.javascriptpeixun.cn/my/course/1312" target="_blank">http://www.javascriptpeixun.cn/my/course/1312</a> <br>
  这个课程是咱们以后最新的录播视频</p>
</blockquote>

<p><img longdesc="./1577891595777.png" alt="Alt text" title="" type="image/png" src="" class=""></p>

<blockquote>
  <p>链接：<a href="https://pan.baidu.com/s/1rWdx4fizVMxHyVxgpbDuZg" target="_blank">https://pan.baidu.com/s/1rWdx4fizVMxHyVxgpbDuZg</a>  <br>
  提取码：ljw0 <br>
  这个是咱们以后讲义的地址（如果不心疼自己是付费的学员，别人免费也可以看，就保守好，别对外泄露 (#^.^#)）</p>
</blockquote></div></body></html>